package com.bbcare.exportExcel.plat.utils;

import com.bbcare.exportExcel.plat.service.IExportService;
import org.apache.log4j.Logger;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;


@Component
public class Asyn {
    private final static Logger logger = Logger.getLogger(Asyn.class);

    @Autowired
    private IExportService exportService;


    @Async
    public void startExport(final String tenantId, final String doctorId, final String queueId, final String startDate, final String endDate) throws Exception {
        logger.info("++++startExport()"+Thread.currentThread().getName());
        exportService.export(tenantId, doctorId, queueId, startDate, endDate);
    }

}
